﻿ @model NC.ViewModels.Subcribe
           <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
           <script type="text/javascript">
               $(function () {
                       $.getJSON("/NepaliCorner/LoadDDLCategory", { id: "1" }, function (catData) {
                       var select = $("#ddlCategory");
                       select.empty();
                       select.append($('<option/>', {
                           value: 0,
                           text: "Select a Category"
                       }));
                       $.each(catData, function (index, itemData) {

                           select.append($('<option/>', {
                               value: itemData.Value,
                               text: itemData.Text
                           }));

                       });
                   });
                   $.getJSON("/NepaliCorner/LoadDDLStates", { countryId: 1 }, function (stateData) {
                       var select = $("#ddlState");
                       select.empty();
                       select.append($('<option/>', {
                           value: 0,
                           text: "Select a State"
                       }));
                       $.each(stateData, function (index, itemData) {

                           select.append($('<option/>', {
                               value: itemData.Value,
                               text: itemData.Text
                           }));
                       });
                   });
               });
        </script>
            <div class=" registration-left-section" >
                           
                      <div class="box-titled">
      <h5 class="list-group-item active">Subcribe</h5>
    </div>
                            <div class="subcribe-content">
                            <div class="form-horizontal">   
                            @using (Html.BeginForm("RegisterSubcribtion", "NepaliCorner"))
      {             
         <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">Email</label>
        <div class="col-sm-9"> @Html.TextBoxFor(model => model.SubscriptionEmailId, new { @class = "form-control", @required = "required" })</div>
         </div>
       
       <div class="panel-group" id="accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
          Click to add category, state
        </a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse">
      <div class="panel-body" id="catcheckbox">
         <label for="inputEmail3" class="col-sm-6 control-label lbltextalign">Categories:</label><div style="clear:both; height:5px;"></div>
       @{
          foreach (var cat in Model.Category)
          {
               <div class="form-group">
        
                <div class="col-sm-12">
                
                 <label for="inputEmail3" class="col-sm-8 control-label catfontstyle"> @cat.CategoryName</label>
                    @*@Html.CheckBox(@cat.CategoryName,false)*@
                    @Html.CheckBox(@cat.CategoryName, new { Name ="selectcat", Value = @cat.Id })
            
               </div>
               </div>
          }
           }
            
            <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">State</label>
        <div class="col-sm-9">@Html.DropDownListFor(model => model.StateId, new SelectList(Enumerable.Empty<SelectListItem>(), "stateId", "stateText"),
"Select", new { id = "ddlState", @class = "form-control" }) </div>
            </div>
      </div>
    </div>
  </div>
  </div>


            <button type="submit" class="btn btn-primary" id="subscribebtn">Submit</button>
      }
      </div>
            </div>
  
                     
                      
                    </div>



                    